package com.example.demo.controller;

import com.example.demo.service.SchedualServiceHi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2018/9/24.
 * 对外暴露一个”/hello”的API接口，通过上面定义的Feign客户端SchedualServiceHi 来消费服务
 */
@RestController
public class HelloController {

    @Autowired
    private SchedualServiceHi schedualServiceHi;

    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    public String hello(){
        return schedualServiceHi.sayHiFromClientOne("admin");
    }

}
